package cn.kgm.template.dto.dto;

import cn.kgm.template.dto.base.TemplateEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;import lombok.*;
import lombok.experimental.SuperBuilder;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * # 技术改变自己 #
 * 模板数据,select标签表
 *
 * @author kapp-i
 * @date 2024-03-18 14:47:46
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "TemplateSelectsSaveDTO", description = "模板数据,select标签表")
public class TemplateSelectsSaveDTO extends TemplateEntity<Long> {

    /**
     * 模板ID
     */
    @ApiModelProperty(value = "模板ID", position = 2)
    @NotNull(message = "模板ID不能为空")
    private Long templateId;

    /**
     * 0,预设select标签,1,动态select标签
     */
    @ApiModelProperty(value = "0,预设select标签,1,动态select标签", position = 4)
    @NotNull(message = "0,预设select标签,1,动态select标签不能为空")
    private Integer isLife;

    /**
     * islife = 1 时,需要配置请求地址
     */
    @ApiModelProperty(value = "islife = 1 时,需要配置请求地址", position = 5)
    @Size(max = 512, message = "islife = 1 时,需要配置请求地址长度不能超过512")
    @NotBlank(message = "islife = 1 时,需要配置请求地址不能为空")
    private String apiUrl;

    /**
     * # 是否单选,1,是单选,0,多选
     */
    @ApiModelProperty(value = "# 是否单选,1,是单选,0,多选", position = 8)
    @NotNull(message = "# 是否单选,1,是单选,0,多选不能为空")
    private Boolean isSingle;

}
